class mError (Exception):
	def __init__ (self, Message, Filename=None, LineNo=None):
		self.Message = Message
		self.Filename = Filename
		self.LineNo = LineNo

	def __str__ (self):
		return ("%s ERROR (%s:%d): %s" % (self.Type, self.Filename or 'STDIN', self.LineNo or 0, self.Message))
# ----------------------------------------------------------------------------

class mTokenError (mError):
	Type = 'PARSE'
# ----------------------------------------------------------------------------

class mCheckError (mError):
	Type = 'CHECK'
# ----------------------------------------------------------------------------
